<template>
  <div class="poll_box" v-if="id == 1">{{ pollName }}</div>
</template>
<script>
export default {
  name: "PublicPoll",
  props: {
    id: {
      type: [String, Number],
      default: 0,
    },
  },
  watch: {
    id: {
      handler: function (n) {
        let _nameList = {
          0: "",
          1: "公共池",
        };
        this.pollName = _nameList[n];
      },
      immediate: true,
    },
  },
  data() {
    return {
      pollName: "",
    };
  },
};
</script>
<style lang="scss" scoped>
.poll_box {
  display: inline-block;
  background: #fdf6ec;
  border: 1px solid #faecd8;
  color: #e6a23c;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 12px;
}
</style>